import React, { Component } from 'react';
import IceContainer from '@icedesign/container';
import { Grid } from '@alifd/next';
import eventProxy from '../../../../../libs/eventProxy';
import AddDialog from '../AddDialog';

export default class FilterBar extends Component {
  static displayName = 'FilterBar';

  static propTypes = {};

  static defaultProps = {};

  constructor(props) {
    super(props);
    this.state = {
      systems: [],
    };
  }

  componentDidMount() {
  }
  /**
   * Select 发生改变的时候触发的回调
   */
  handleSelectChange = (value) => {
    let cur;
    this.state.systems.forEach((ele) => {
      if (ele.value === value) {
        cur = ele;
      }
    });
    this.setState({
      curSystem: cur,
    });
    eventProxy.trigger('system:select:change', value);
  };


  getFormValues =(values) => {
    
  }
  render() {
    const { Row, Col } = Grid;
    return (
      <IceContainer >
        <Row align="center" justify="end">
          <Col span="2">
            <AddDialog
              getFormValues={this.getFormValues}
            />
          </Col>
        </Row>
      </IceContainer>
    );
  }
}